//
//  NaiveBayesClassifier.h
//
//  Created by Rune Laugesen on 22/01/12.
//  Copyright 2012 Copenhagen University. All rights reserved.
//

#ifndef Dictionary_NaiveBayesClassifier_h
#define Dictionary_NaiveBayesClassifier_h

#include "Classifier.h"

using namespace std;


class NaiveBayesClassifier : public Classifier
{
private:
    int _instancecount;
    double _p;
    int _n;
    int _n_c;
    int _m;    
    //map<string, double> _classes;
    //Features <WORD, [POS, LEMMA, CLUSTER, NER, TOPIC]>
    FeatureMap _featuredata;
    Instances _trainingdata;
    
public:
    NaiveBayesClassifier();
    void TrainClassifier(InstanceList trainingdata, SWPS swps);
    void BuildFeatureData(vector< vector<string> > featuredata, SWPS swps);
    //Obsolete
    map<double, string> Classify(StringList words, StringList features);
    map<double, string> Classify(StringList words, SWPS swps);
    //Used with BKTree weights
    map<double, string> Classify(WeightedStringList words, SWPS swps);
    void SetTrainingData(Instances trainingdata);
    Instances GetTrainingData() const;
    void SetFeatureData(FeatureMap featuredata);
    FeatureMap GetFeatureData() const;
};


#endif
